import axios from "axios";
const requests = axios.create({
    baseURL: "/api",
    timeout: 5000,
})
requests.defaults.headers.post["Content-Type"] = "application/json;charset=UTF-8";
requests.interceptors.request.use(
    (config) => {
        return config;
    },
    (error) => {
        return Promise.reject(error);
    }
);
requests.interceptors.response.use(
    (response) => {
        return response.data;
    },
    (error) => {
        return Promise.reject(error);
    }
);
export default requests;